<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>navistore.backend.restkit.resource.Resource : API documentation</title>
    <meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
    <link href="apidocs.css" type="text/css" rel="stylesheet" />
    
    
  </head>
  <body>
    <h1 class="class">n.b.r.r.Resource(<span title="object">object</span>) : class documentation</h1>
    <p>
      <span id="part">Part of <a href="navistore.html">navistore</a>.<a href="navistore.backend.html">backend</a>.<a href="navistore.backend.restkit.html">restkit</a>.<a href="navistore.backend.restkit.resource.html">resource</a></span>
      
      <a href="classIndex.html#navistore.backend.restkit.resource.Resource">View In Hierarchy</a>
    </p>
    <div>
      
    </div>
    <div>A class that can be instantiated for access to a RESTful resource, 
including authentication.<table class="fieldTable"></table></div>

    
    
    <div id="splitTables">
      <table class="children sortable" id="id71">
  
  
<tr class="method">
    
    
    <td>Method</td>
    <td><a href="navistore.backend.restkit.resource.Resource.html#__init__">__init__</a></td>
    <td><span>Constructor for a `Resource` object.</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="navistore.backend.restkit.resource.Resource.html#__repr__">__repr__</a></td>
    <td><span class="undocumented">Undocumented</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="navistore.backend.restkit.resource.Resource.html#clone">clone</a></td>
    <td><span>if you want to add a path to resource uri, you can do:</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="navistore.backend.restkit.resource.Resource.html#__call__">__call__</a></td>
    <td><span>if you want to add a path to resource uri, you can do:</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="navistore.backend.restkit.resource.Resource.html#get">get</a></td>
    <td><span>HTTP GET</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="navistore.backend.restkit.resource.Resource.html#head">head</a></td>
    <td><span>HTTP HEAD</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="navistore.backend.restkit.resource.Resource.html#delete">delete</a></td>
    <td><span>HTTP DELETE</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="navistore.backend.restkit.resource.Resource.html#post">post</a></td>
    <td><span>HTTP POST</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="navistore.backend.restkit.resource.Resource.html#put">put</a></td>
    <td><span>HTTP PUT</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="navistore.backend.restkit.resource.Resource.html#do_request">do_request</a></td>
    <td><span class="undocumented">Undocumented</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="navistore.backend.restkit.resource.Resource.html#request">request</a></td>
    <td><span>HTTP request</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="navistore.backend.restkit.resource.Resource.html#update_uri">update_uri</a></td>
    <td><span>to set a new uri absolute path</span></td>
  </tr><tr class="method private">
    
    
    <td>Method</td>
    <td><a href="navistore.backend.restkit.resource.Resource.html#_set_default_attrs">_set_default_attrs</a></td>
    <td><span class="undocumented">Undocumented</span></td>
  </tr>
  
</table>
      
      
    </div>
    
    
    

    <div class="function">
  <a name="navistore.backend.restkit.resource.Resource.__init__">
    
  </a>
  <a name="__init__">
    
  </a>
  <div class="functionHeader">
    
    def
    __init__(self, uri, headers=None, **client_opts):
    
  </div>
  <div class="functionBody">
    
    <pre>Constructor for a `Resource` object.

Resource represent an HTTP resource.

:param uri: str, full uri to the server.
:param headers: dict, optionnal headers that will
    be added to HTTP request.
:param client_opts: `restkit.client.HttpConnection` Options</pre>
  </div>
</div><div class="function">
  <a name="navistore.backend.restkit.resource.Resource.__repr__">
    
  </a>
  <a name="__repr__">
    
  </a>
  <div class="functionHeader">
    
    def
    __repr__(self):
    
  </div>
  <div class="functionBody">
    
    <div class="undocumented">Undocumented</div>
  </div>
</div><div class="function">
  <a name="navistore.backend.restkit.resource.Resource._set_default_attrs">
    
  </a>
  <a name="_set_default_attrs">
    
  </a>
  <div class="functionHeader">
    
    def
    _set_default_attrs(self, obj):
    
  </div>
  <div class="functionBody">
    
    <div class="undocumented">Undocumented</div>
  </div>
</div><div class="function">
  <a name="navistore.backend.restkit.resource.Resource.clone">
    
  </a>
  <a name="clone">
    
  </a>
  <div class="functionHeader">
    
    def
    clone(self):
    
  </div>
  <div class="functionBody">
    
    <pre>if you want to add a path to resource uri, you can do:

.. code-block:: python

    resr2 = res.clone()</pre>
  </div>
</div><div class="function">
  <a name="navistore.backend.restkit.resource.Resource.__call__">
    
  </a>
  <a name="__call__">
    
  </a>
  <div class="functionHeader">
    
    def
    __call__(self, path):
    
  </div>
  <div class="functionBody">
    
    <pre>if you want to add a path to resource uri, you can do:

.. code-block:: python

    Resource("/path").get()</pre>
  </div>
</div><div class="function">
  <a name="navistore.backend.restkit.resource.Resource.get">
    
  </a>
  <a name="get">
    
  </a>
  <div class="functionHeader">
    
    def
    get(self, path=None, headers=None, **params):
    
  </div>
  <div class="functionBody">
    
    <pre>HTTP GET         

:param path: string  additionnal path to the uri
:param headers: dict, optionnal headers that will
    be added to HTTP request.
:param params: Optionnal parameterss added to the request.</pre>
  </div>
</div><div class="function">
  <a name="navistore.backend.restkit.resource.Resource.head">
    
  </a>
  <a name="head">
    
  </a>
  <div class="functionHeader">
    
    def
    head(self, path=None, headers=None, **params):
    
  </div>
  <div class="functionBody">
    
    <div>HTTP HEAD</p>
<p>see GET for params description.<table class="fieldTable"></table></div>
  </div>
</div><div class="function">
  <a name="navistore.backend.restkit.resource.Resource.delete">
    
  </a>
  <a name="delete">
    
  </a>
  <div class="functionHeader">
    
    def
    delete(self, path=None, headers=None, **params):
    
  </div>
  <div class="functionBody">
    
    <div>HTTP DELETE</p>
<p>see GET for params description.<table class="fieldTable"></table></div>
  </div>
</div><div class="function">
  <a name="navistore.backend.restkit.resource.Resource.post">
    
  </a>
  <a name="post">
    
  </a>
  <div class="functionHeader">
    
    def
    post(self, path=None, payload=None, headers=None, **params):
    
  </div>
  <div class="functionBody">
    
    <pre>HTTP POST

:param payload: string passed to the body of the request
:param path: string  additionnal path to the uri
:param headers: dict, optionnal headers that will
    be added to HTTP request.
:param params: Optionnal parameterss added to the request</pre>
  </div>
</div><div class="function">
  <a name="navistore.backend.restkit.resource.Resource.put">
    
  </a>
  <a name="put">
    
  </a>
  <div class="functionHeader">
    
    def
    put(self, path=None, payload=None, headers=None, **params):
    
  </div>
  <div class="functionBody">
    
    <div>HTTP PUT</p>
<p>see POST for params description.<table class="fieldTable"></table></div>
  </div>
</div><div class="function">
  <a name="navistore.backend.restkit.resource.Resource.do_request">
    
  </a>
  <a name="do_request">
    
  </a>
  <div class="functionHeader">
    
    def
    do_request(self, url, method='GET', payload=None, headers=None):
    
  </div>
  <div class="functionBody">
    
    <div class="undocumented">Undocumented</div>
  </div>
</div><div class="function">
  <a name="navistore.backend.restkit.resource.Resource.request">
    
  </a>
  <a name="request">
    
  </a>
  <div class="functionHeader">
    
    def
    request(self, method, path=None, payload=None, headers=None, **params):
    
  </div>
  <div class="functionBody">
    
    <pre>HTTP request

This method may be the only one you want to override when
subclassing `restkit.rest.Resource`.

:param payload: string or File object passed to the body of the request
:param path: string  additionnal path to the uri
:param headers: dict, optionnal headers that will
    be added to HTTP request.
:param params: Optionnal parameterss added to the request</pre>
  </div>
</div><div class="function">
  <a name="navistore.backend.restkit.resource.Resource.update_uri">
    
  </a>
  <a name="update_uri">
    
  </a>
  <div class="functionHeader">
    
    def
    update_uri(self, path):
    
  </div>
  <div class="functionBody">
    
    <div>to set a new uri absolute path<table class="fieldTable"></table></div>
  </div>
</div>
    <address>
      <a href="index.html">API Documentation</a> for navistore, generated by <a href="http://codespeak.net/~mwh/pydoctor/">pydoctor</a> at 2010-11-13 15:44:55.
    </address>
  </body>
</html>